#ifndef PLUGIN1_H
#define PLUGIN1_H

#include <QObject>

#include "PluginInterface.h"

class Plugin1Private;
class PLUGININTERFACE_EXPORT Plugin1 : public QObject, public PluginInterface {
  Q_OBJECT
  Q_INTERFACES(PluginInterface)
  Q_PLUGIN_METADATA(IID "com.zmgrobot.Plugins.Plugin1" FILE "mymetadata.json")
public:
  explicit Plugin1(QObject * = nullptr);
  ~Plugin1() override;

  static Plugin1 *instance();

  QWidget *widget() override;
  void receiveMessage(PluginMessage) override;
  PluginMessage handleMessage(PluginMessage) override;

  QString getPlugin2Label();
signals:
  void sendMessage(PluginMessage) override;

private:
  Plugin1Private *const d_ptr;
  Q_DECLARE_PRIVATE(Plugin1)
};

#endif // PLUGIN1_H
